import request from '../../../utils/request';

export const userData = query => {
    return request({
        url: '/api/upp/user/doMain',
        method: 'post',
        // url: './json/userlist.json',
        // method: 'get',
        params: query,
    });
};
export const doAdd = query => {
    return request({
        url: '/api/upp/user/doAdd',
        method: 'post',
        // url: './json/addORupdatepatient.json',
        // method: 'get',
        params: query,
    });
};
//根据userAcct 判断该用户是否已存在
export const isNotExists = query => {
    return request({
        url: '/api/upp/user/isNotExists',
        method:'post',
        // url:'./json/isNotExists.json',
        // method: 'get',
        params: query
    });
};
//删除用户
export const doDelete = query => {
    return request({
        url: '/api/upp/user/doDelete',
        method:'delete',
        // url:'./json/addORupdatepatient.json',
        // method: 'get',
        params: query
    });
};
//判断输入密码是否正确
export const isPwdTrue = query => {
    return request({
        url: '/api/upp/user/checkPwd',
        method:'post',
        // url:'./json/isNotExists.json',
        // method: 'get',
        params: query
    });
};
//修改编辑用户
export const doUpdate = query => {
    return request({
        url: '/api/upp/user/doUpdate',
        method:'post',
        // url:'./json/addORupdatepatient.json',
        // method: 'get',
        params: query
    });
};
//修改用户密码
export const updatePwd = query => {
    return request({
        url: '/api/upp/user/updatePwd',
        method:'post',
        // url:'./json/addORupdatepatient.json',
        // method: 'get',
        params: query
    });
};
//获取所有治疗师
export const getcrtBys = () => {
    return request({
        url: '/api/stand/prescription/preTherapes',
        method:'post',
        // url:'./json/userlist.json',
        // method: 'get',
    });
};
// 根据用户accout 查询用户信息
export const selectByAcct = query => {
    return request({
        url: '/api/upp/user/selectByAcct',
        method:'post',
        // url:'./json/user.json',
        // method: 'get',
        params: query
    });
};
//根据秘钥查询数据库是否存在该版本
export const updateSystem = query => {
    return request({
        url: '/api/stand/update/system',
        method:'post',
        // url:'./json/addORupdatepatient.json',
        // method: 'get',
        params: query
    });
};
//根据秘钥查询更新速度
export const updateSpeed = query => {
    return request({
        url: '/api/stand/update/speed',
        method:'post',
        // url:'./json/speed.json',
        // method: 'get',
        params: query
    });
};
// 判断秘钥是否正确
export const checkSystemId = query => {
    return request({
        url: '/api/stand/update/checkSystemId',
        method:'post',
        // url:'./json/addORupdatepatient.json',
        // method: 'get',
        params: query
    });
};
//getVersion 获取版本
export const getVersion = query => {
    return request({
        url: '/api/stand/index/getVersion',
        method:'post',
        // url:'./json/version.json',
        // method: 'get',
        params: query
    });
};



